import React from "react";
import {Layout} from 'antd';
import Iheader from './Iheader';
import AppIndex from '../index/AppIndex';

const {Header, Content, Footer} = Layout;

export default class Home_app extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            choose_num: 0
        }
    }

    onChangeNum(e) {
        this.setState({
            choose_num: e
        });
    }

    render() {
        return (
            <div>
                <Layout>
                    <Header style={{backgroundColor: 'white'}}>
                        <Iheader choose={this.state.choose_num} onChange={this.onChangeNum.bind(this)}/>
                    </Header>
                </Layout>
                <Layout>
                    <Content style={{margin: '1% 1% 0 1%', overflow: 'auto', backgroundColor: 'white'}}>
                        <AppIndex choose={this.state.choose_num}/>
                    </Content>
                </Layout>
            </div>
        )
    }
}